package com.example.data.permission.dao;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.example.data.permission.entity.User;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.data.permission.entity.pojo.UserInfoDTO;
import com.example.data.permission.mp.permission.DataPermission;
import com.example.data.permission.mp.permission.DataPermissionType;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 用户表 Mapper 接口
 * </p>
 *
 * @author demo
 * @since 2021-07-22
 */
public interface UserMapper extends BaseMapper<User> {

    UserInfoDTO getUserInfoByUserName(String username);


    @Override
    @DataPermission(type = DataPermissionType.OWN_SHOP_CHILD)
    List<User> selectList(@Param("ew") Wrapper<User> queryWrapper);

}
